Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase commits from rk-6.1-rk1 to rk-6.1-rkr3 #200

Merged
merged 249 commits into from
Jul 18, 2024

Conversation

amazingfate
Copy link
Collaborator

@amazingfate amazingfate commented Jul 1, 2024

Dropped commits:

commit drop reason
drm/rockchip: vop2: remove WARN_ON for drm_modeset_is_locked rockchip has reworked vop2 driver, need to check if this patch is still necessarythis WARN_ON is removed in rkr3
gpu: drm: rockchip: suppress unsupported format rockchip has reworked vop2 driver ,need to check if this patch is still necessary. Rkr3 adds a new condition !rockchip_rfbc(plane, modifier) to this ERROR log, and I haven't see it after boot. The error log will print plane name, so I think it should be okay to keep this.
video: rockchip: rga3: fix 4:2:2 10-bit reading in rga2 rockchip has reworked rga2 driver and added 444 support, but 422 is also dropped, this patch is already reworked by @nyanmisaka
driver: rknpu: Update rknpu driver, version: 0.9.4 rknpu has been update to 0.9.7
driver: rknpu: Update rknpu driver, version: 0.9.5 rknpu has been update to 0.9.7
Updated drivers/rknpu to 0.9.6 rknpu has been update to 0.9.7
version_compat_defs: Add vm_flags_set()/vm_flags_clear() rkr3 already has this commit
Avoid EPROBE_DEFER loop with Rockchip DSI driver rockchip has reworked dsi driver and we need to check if patch is still necessary. @ginkage has confirmed that rockchip has exactly the same fix: d420d65

I just made these patches applied, have not built this kenel yetkernel boots fine.

RadxaStephen and others added 30 commits July 1, 2024 10:25
arm64: dts: Add device trees for NanoPi R6S and R6C

arm64: dts: Add device trees for NanoPi R6S and R6C

arm64: dts: Add device trees for NanoPi R6S and R6C
- rework:
  - rk3588-rk806-single-khadas.dtsi instead of hacking common dtsi
  - arm64: dts: rk3588s-khadas-edge2: remove chosen node
  - drop useless nvr-demo / chosen-thingy dtsi
- squashed, scripts/packaging/etc removed, grouped by directory
- source
  - https://github.com/khadas/linux/commits/khadas-edges-5.10.y
  - khadas/linux@85a8b25
@amazingfate amazingfate marked this pull request as draft July 1, 2024 02:59
@nyanmisaka
Copy link
Collaborator

video: rockchip: rga3: fix 4:2:2 10-bit reading in rga2
They relocate the code and the patch needs to be slightly modified to fit. See Joshua-Riek@f3e09e2

Like 4:2:0 10-bit, rotate_mode needs to be assigned to
(1 << 6) when scaling is not going to be used in rga2.
Or the output image is corrupted.

Signed-off-by: nyanmisaka <[email protected]>
@ginkage
Copy link
Collaborator

ginkage commented Jul 1, 2024

Re: "rockchip has reworked dsi driver and we need to check if patch is still necessary" for f85a2f1
Looks like they've applied almost exactly the same patch: d420d65

On a related note, where did the rkr3 branch come from? I can't see it in Jeffy's mirrors.

@amazingfate
Copy link
Collaborator Author

Re: "rockchip has reworked dsi driver and we need to check if patch is still necessary" for f85a2f1 Looks like they've applied almost exactly the same patch: d420d65

Good to hear, so we can just drop this commit.

On a related note, where did the rkr3 branch come from? I can't see it in Jeffy's mirrors.

Rockchip just released new sdk with kernel tag rkr3 to their customers several days ago. Jeffy doesn't have much permission to upload such new kernel version.

@Joshua-Riek Joshua-Riek marked this pull request as ready for review July 1, 2024 13:15
@Joshua-Riek Joshua-Riek marked this pull request as draft July 1, 2024 13:16
@Joshua-Riek
Copy link
Collaborator

Whoops, I accidentally marked it as ready for review, ignore that lol.

@Joshua-Riek
Copy link
Collaborator

Hey @amazingfate, I found a bug where max user processes and pending signals where very low on the 6.1 rkr3 kernel, causing some users to experience a number of issues preventing new processes to be started when there is ample resources available on the system.

I did some bisecting and was able to hunt down the problematic commits; 286ef81 and 8ca3ffc, I recommend they be reverted. I'm very curious about commit 286ef81 as to why it caused the problem, but this is something I will research another day.

Additional Info: Joshua-Riek/ubuntu-rockchip#919

@amazingfate
Copy link
Collaborator Author

@Joshua-Riek Do you have CONFIG_ROCKCHIP_THUNDER_BOOT or CONFIG_ROCKCHIP_THUNDER_BOOT_DEFER_FREE_MEMBLOCK enabled? That two commits are related to these two kernel config.

@Joshua-Riek
Copy link
Collaborator

I had CONFIG_ROCKCHIP_THUNDER_BOOT_DEFER_FREE_MEMBLOCK=y in the kernel config when I encountered this issue. But now you point it out, it may be better to ensure both CONFIG_ROCKCHIP_THUNDER_BOOT_DEFER_FREE_MEMBLOCK and CONFIG_ROCKCHIP_THUNDER_BOOT are disabled, so there is no need to revert any commits.

Joshua-Riek and others added 6 commits July 16, 2024 21:28
…otup"

This reverts commit d376ca6.

It's reported that when using Radxa CM5 with RPI CM4 IO board,
USB2.0 host ports don't work.

By default RK3588 USB DRD DWC3_0 (usb@fc000000) is set in otg mode.
In hardware, RK3588 TYPEC0_USB20_OTG_ID is pulled down to groud
by a 2.2k resistor.

It is needed to perform GCTL_CORE_SOFTRESET during bootup.

Signed-off-by: Stephen Chen <[email protected]>
(cherry picked from commit ec8a9ad)
Signed-off-by: Joshua Riek <[email protected]>
…oard devicetree

hdptxphy_hdmi_clk0/1 sub node is removed by commit fa7c72a:
arm64: dts: rockchip: rk3588: remove unused sub node hdptxphy_hdmi_clk0/1.

So remove them from all the board dts.
@amazingfate
Copy link
Collaborator Author

Tested with rk3568 board hinlink-h66k and rk3528 board hinlink-ht2 and rk3588 board rock-5b, working fine.

@amazingfate amazingfate marked this pull request as ready for review July 16, 2024 14:53
@rpardini
Copy link
Member

rpardini commented Jul 18, 2024

Tested on Mekotronics R58X (-4G, but -Pro and others should be the same). Seems to work fine. Tested the 2 gmac eths, wifi, wwan (which is USB2), USB3, USB-C's UDC, DisplayPort, nvme.

For reference, complete ANSI dmesg across kernels on this board.

@rpardini
Copy link
Member

Also tested on Meko R58X-Pro with Panthor and KDE-Neon. Works fine.

@rpardini
Copy link
Member

Tested on the Mixtile-Blade3, including SATA (via overlay), 4-pin fan, nvme, 2x 2.5gbit eth.

dmesg:

With rkr3, seems like there's some dmesg errors ref regulators and mpp_rkvenc2 and mpp_rkvdec2 and vop. So I'm thinking maybe some board DT nodes need tweaking?

I've quickly tested Jellyfin (10.9.7) and it transcodes Stream #0:0 -> #0:0 (h264 (h264_rkmpp) -> hevc (hevc_rkmpp)), possibly with slightly higher CPU usage than I was used to, but I'm unsure.

@rpardini
Copy link
Member

Tested on NanoPC T6-LTS, after cherry-picking and adapting #207.
(Sent amazingfate#1 to @amazingfate against his wip branch for ease-of-mergeness).

nvme, usb2 / usb3 / type-c udc, hdmi, etc, all work.

Copy link
Member

@rpardini rpardini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't find any blockers across all the tests I did. I'd say merge! Thanks for the amazing work.

@amazingfate amazingfate merged commit 672dacb into armbian:rk-6.1-rkr3 Jul 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.